class UrlMappings {

	static mappings = {

        // this handles existing links in bios that refer to another entry by {surname}.biography.html
        "/person/biog/$fname?"{
            controller = "person"
            action = "namedBiog"
            constraints {
                fname(validator: {
                    (it.size() > 10 && it[-10..-1] == '.biography') ||
                    it.indexOf('-') > 0 })
            }
        }

        "/$controller/$action?/$id?"{
            constraints {
                // apply constraints here
            }
        }

		"/"(view:"/index")
		"500"(view:'/error')
	}
}
